@use "sass:list";
$pixel: 0, 5, 7, 8, 10, 14, 15, 16, 20, 25, 24, 30, 32, 35, 40, 45, 48, 50, 60,
  70, 80, 90, 100;
$position: top, right, bottom, left;
$position-class: "t", "r", "b", "l";

@each $item in $pixel {
  @each $p in $position {
    $index: list.index($position, $p);
    $class: list.nth($position-class, $index);

    .m#{$class}-#{$item} {
      margin-#{$p}: $item + px;
    }

    .p#{$class}-#{$item} {
      padding-#{$p}: $item + px;
    }
  }
}

%flex-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

.flex-col-4px {
  @extend %flex-col;
  row-gap: 4px;
}

.flex-col-5px {
  @extend %flex-col;
  row-gap: 5px;
}

.flex-col-8px {
  @extend %flex-col;
  row-gap: 8px;
}

.flex-col-10px {
  @extend %flex-col;
  row-gap: 10px;
}

.flex-col-16px {
  @extend %flex-col;
  row-gap: 16px;
}

.flex-col-20px {
  @extend %flex-col;
  row-gap: 20px;
}

.flex-col-24px {
  @extend %flex-col;
  row-gap: 24px;
}

.flex-col-32px {
  @extend %flex-col;
  row-gap: 32px;
}

%flex-row {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
}

.flex-row-4px {
  @extend %flex-row;
  column-gap: 4px;
}

.flex-row-5px {
  @extend %flex-row;
  column-gap: 5px;
}

.flex-row-8px {
  @extend %flex-row;
  column-gap: 8px;
}

.flex-row-10px {
  @extend %flex-row;
  column-gap: 10px;
}

.flex-row-16px {
  @extend %flex-row;
  column-gap: 16px;
}

.flex-row-20px {
  @extend %flex-row;
  column-gap: 20px;
}

.flex-row-24px {
  @extend %flex-row;
  column-gap: 24px;
}

.flex-row-32px {
  @extend %flex-row;
  column-gap: 32px;
}

.word-break {
  word-break: break-all;
}

.padding-lr-10px {
  padding: 0 10px;
}

.limit-line {
  white-space: normal;
  word-break: break-all;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  line-clamp: var(--line-count);
  -webkit-line-clamp: var(--line-count);
}

.slide {
  touch-action: none;
  height: 100%;
  width: 100%;
  transition: height 0.3s;
  position: relative;
  overflow: hidden;

  .slide-infinite {
    z-index: 1;
    margin-top: 0;
    transition: all 0.3s;
  }

  .slide-list {
    height: 100%;
    width: 100%;
    display: flex;
    position: relative;
  }
}

video,
.vjs-big-play-button {
  pointer-events: none;
}

.video-js {
  width: 100%;
  height: 100%;

  .vjs-control-bar {
    background-color: transparent !important;
  }

  .vjs-big-play-button {
    border: none !important;
    background-color: transparent !important;
    line-height: 1.6332em !important;

    .vjs-icon-placeholder {
      color: rgba($color: #fff, $alpha: 0.3);

      &::before {
        font-family: "iconfont" !important;
        font-style: normal;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        content: "\e77c" !important;
        font-size: 60px !important;
      }
    }
  }
}

.van-text-ellipsis__action {
  text-decoration: underline;
}

.comment-area {
  .vilykke-like-area {
    div {
      font-size: 16px !important;
    }

    div[style="display: grid;grid-template-columns: auto auto;"] {
      div {
        &:nth-of-type(2) {
          font-size: 12px !important;
        }
      }
    }

    .vilykke-item-percent {
      height: 20px !important;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 40px !important;
      // aspect-ratio: 1/1;
      border-radius: 10px !important;
      font-size: 12px !important;
    }

    img {
      width: 55px !important;
      aspect-ratio: 1/1;
      height: auto !important;
    }

    #vilykke-list {
      &>div {
        width: 20%;
        display: flex;
        flex-direction: column;
        align-items: center;
      }
    }

    .vilykke-item-name {
      font-size: 12px !important;
      color: #666 !important;
    }
  }
}

.advert-index {
  &:has(ins[data-ad-status="unfilled"]) {
    display: none;
  }
}

.home-scroll-snap {
  &:has(ins[data-ad-status="filled"]) {
    .height-auto-item {
      height: auto !important;
    }
  }
}

.br-lt-10 {
  border-radius: 10px 0 0 0;
}

.br-rt-10 {
  border-radius: 0 10px 0 0;
}

.br-rb-10 {
  border-radius: 0 0 10px 0;
}

.br-lb-10 {
  border-radius: 0 0 0 10px;
}

.br-rb-lb-10 {
  border-radius: 0 0 10px 10px;
}